#!usr/lib/perl
use warnings;
use utf8;
use 5.010;

my %words; 

say "type some words: ";
while(<STDIN>){
	chomp (my $w = $_);
	if(exists $words{$w}){
		$words{$w}++;
		}
	else{
		$words{$w} = 1;
		}	
	}

# my @toPrint = %words;
# print "@toPrint\n";



foreach my $w(sort keys %words){
	say $w, " = ", $words{$w};
	}


print "CHARACTER is", $ENV{CHARACTER};

